package com.xgzit.xgzmall.member;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 1、引入open-feign
 * 2、编写一个 接口，告诉SpringCloud 这个接口需要调用远程服务
 * 3、声明接口的每一个方法都是调用哪个服务的哪一个请求
 * 4、开启远程调用功能 @EnableFeignClients，注解里面写第二部写的 接口所在的包路径
* */
@EnableRedisHttpSession
@EnableFeignClients(basePackages = "com.xgzit.xgzmall.member.feign")
@EnableDiscoveryClient
@MapperScan("com.xgzit.xgzmall.member.dao")
@SpringBootApplication
public class XgzmallMemberApplication {

    public static void main(String[] args) {
        SpringApplication.run(XgzmallMemberApplication.class, args);
    }

}
